package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.vo.wr.QsPageVo;
import com.cloudkinto.entity.QuotationSchemeDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author hua
 * @since 2024-11-15
 */
@Mapper
public interface QuotationSchemeDao extends BaseMapper<QuotationSchemeDo> {
    int updateDelete(Long id, Long userId, Long tenantId);

    IPage<QsPageVo> list(@Param("page") IPage<QsPageVo> page, @Param("map") Map<String, Object> map);

    List<QsPageVo> list(@Param("map") Map<String, Object> map);

    List<QsPageVo> relatedQsList(@Param("map") Map<String, Object> map);

    int getQsItemTypeUseCount(Long thirdId, Integer quotationItemType, Long tenantId);

    QuotationSchemeDo getQsByCompanyId(Long companyId, Long whId);

    int getQsByForSetStorage(Long companyId, Long whId);

    int getLcUseCount(List<Long> storageIds, Long channelId, Long tenantId);

}
